FROM opensuse/leap
RUN zypper --non-interactive install  dnf
RUN dnf clean all
RUN zypper --non-interactive lr
RUN zypper --non-interactive  --gpg-auto-import-key refresh
RUN zypper --non-interactive lr
RUN zypper --non-interactive  install -y dnf-command\(builddep\) rpmdevtools

RUN zypper --non-interactive clean
RUN zypper --non-interactive up -y && \
    zypper --non-interactive install -y  Mesa-dri-devel Mesa-dri && \
    zypper --non-interactive install -y libinput-devel && \
    zypper --non-interactive install -y \
        git \
        rpm-build \
        tar \
        make \
        autoconf \
        automake \
        cmake \
        speexdsp-devel \
        libpulse-devel \
        libcanberra-devel \
        libcurl-devel \
        libtool \
        libQt5DBus-devel \
        pcre-devel \
        yaml-cpp-devel \
        boost-devel \
        libdbus-c++-devel \
        libQt5DBus-devel \
        libXext-devel \
        libXfixes-devel \
        yasm \
        nasm \
        speex-devel \
        libgsm-devel \
        chrpath \
        check \
        astyle \
        uuid-devel \
        gettext-devel \
        gcc-c++ \
        which \
        alsa-lib-devel \
        systemd-devel \
        libuuid-devel \
        uuid-devel \
        gnutls-devel \
        libopus-devel \
        patch \
        jsoncpp-devel \
        webkit2gtk3-devel \
        libcryptopp-devel \
        libva-devel \
        libvdpau-devel \
        msgpack-devel \
        clutter-devel \
        openssl-devel \
        clutter-gtk-devel \
        libnma-devel \
        libcryptopp-devel \
        libdbus-c++-devel \
        libQt5DBus-devel \
        libexpat-devel \
        gnome-icon-theme-symbolic \
        libgsm-devel \
        gtk3-devel \
        libappindicator-devel \
        sqlite-devel \
        libQt5Sql-devel \
        libQt5Gui-devel  \
        ffmpeg-4-libavutil-devel \
        gtk3-devel\
        qrencode-devel \
        python3-python-dateutil \
        libqt5-linguist-devel \
        libsndfile-devel \
        evolution-devel

ADD scripts/build-package-opensuse-leap.sh  /opt/build-package-opensuse-leap.sh

CMD /opt/build-package-opensuse-leap.sh
